<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%-- 
    Document   : administration.jsp
    Created on : 28.4.2011, 13:35:46
    Author     : Football-Statistics Team
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="f" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="x" uri="http://java.sun.com/jsp/jstl/xml" %>

<f:setLocale value="${pageContext.request.locale}"/>
<f:setBundle basename="labelsBundle" />

<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title><f:message key="project_title" /></title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <link rel="stylesheet" href="css/admin.css" />
        <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6/jquery.min.js"></script>
        <script type="text/javascript" src="js/adminmenu.js"></script>
    </head>
    <body>
         <%@include file="adminmenu.jsp" %>
        <c:if test="${param.section=='matches' or !empty param.lid}">
            <div class="box">
              <label><f:message key="select_season" />: </label>
            <c:import url="XSLT/leagueSelect.xsl" var="xslt"/>
            <f:message key="select_season" var="select_season"/>
            <x:transform xml="${xml_leagues}" xslt="${xslt}">
                <x:param name="select_season" value="${select_season}"/>
                <x:param name="lid" value="${lid}"/>
                <x:param name="redirect" value="${pageContext.request.contextPath}/administration?section=${section}&lid="/>                
            </x:transform> 
            </div>
        </c:if>
        <c:if test="${param.section=='leagues'}">
            <ul id="nav">
                <li><a href="${pageContext.request.contextPath}/administration/add-league" target="_self"><f:message key="add_league" /></a></li>
                <li><a href="${pageContext.request.contextPath}/administration/remove-league" target="_self"><f:message key="remove_league" /></a></li>
                <li><a href="${pageContext.request.contextPath}/administration/edit-league" target="_self"><f:message key="edit_league" /></a></li>
            </ul>
        </c:if>
        <c:if test="${param.section=='parser'}">
            <c:import url="XSLT/leagueSelect.xsl" var="xslt"/>
            <f:message key="select_season" var="select_season"/>
            <div class="box">
             <label><f:message key="select_season" />: </label>
            <x:transform xml="${xml_leagues}" xslt="${xslt}">
                <x:param name="select_season" value="${select_season}"/>
                <x:param name="redirect" value="${pageContext.request.contextPath}/administration/parse-match?lid="/>                
            </x:transform> 
            </div> 
        </c:if>
        <c:if test="${param.section=='cache'}">
            <ul id="nav">
                <li><a href="${pageContext.request.contextPath}/administration/clear-cache" target="_self"><f:message key="cache_clear" /></a></li>
                <li><a href="${pageContext.request.contextPath}/administration/update-cache" target="_self"><f:message key="cache_update" /></a></li>
            </ul>
        </c:if>        
        <c:if test="${!empty param.lid}">         
            <ul id="nav">
                <li><a href="${pageContext.request.contextPath}/administration/add-match?lid=${lid}" target="_self"><f:message key="add_match" /></a></li>
                <li><a href="${pageContext.request.contextPath}/administration/remove-match?lid=${lid}" target="_self"><f:message key="remove_match" /></a></li>
                <li><a href="${pageContext.request.contextPath}/administration/edit-match?lid=${lid}" target="_self"><f:message key="edit_match" /></a></li>
            </ul>
        </c:if>
    </body>
</html>
